#ifndef STARLING_STANDARD_MACROS_H_
#define STARLING_STANDARD_MACROS_H_

// We have not been supporting 64-bit platform
#define STARLING_HAVE_INT64 0

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#ifndef NULL
#define NULL  ((void*) 0)
#endif

/**
* Define TRUE value for mboolean type
*/
#ifndef FALSE
#define FALSE (0)
#endif

/**
* Define TRUE value for mboolean type
*/
#ifndef TRUE
#define TRUE  (!FALSE)
#endif

#undef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))

#undef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))

#undef ABS
#define ABS(a)    (((a) < 0) ? -(a) : (a))

#undef CLAMP
#define CLAMP(x, low, high)   (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif // STARLING_STANDARD_MACROS_H_
